<h4>General info</h4>

<p>
    This page demonstrates fetching data from the backend via WebSockets and showing it in a simple list.
    This example application fetches <em>authors</em> with related <em>book</em> data populated for each
    and also covers data pagination, sort, and search functions. The actual data is fetched from the
    following endpoint on the backend.
</p>

<pre>GET {{backendConfig.url}}/author <a ng-href="{{backendConfig.url}}/author" target="_blank" data-tooltip="Open endpoint url"><i class="fa fa-external-link"></i></a></pre>

<p>
    Note that all data communication to the backend requires a JSON Web Token (<em>JWT</em>)
    for authentication to make sure that user is allowed to access the data.
</p>

<h4>Functions in this example</h4>

<dl class="dl-horizontal">
    <dt>
        Data fetch
    </dt>
    <dd>
        From backend via WebSockets using <em>$sailsSocket</em> service.
    </dd>

    <dt>
        Search
    </dt>
    <dd>
        Specify which columns are used in search and type your search words to see results while you're typing.
    </dd>

    <dt>
        Pagination
    </dt>
    <dd>
        By default, the page displays an example of ten books per page. You can change the number to be
        displayed per page.
    </dd>

    <dt>
        Sorting data
    </dt>
    <dd>
        Simply by clicking the column header. This will fetch data from backend again. <em>Unfortunately not from
        relation columns... yet.</em>
    </dd>

    <dt>
        Live updates
    </dt>
    <dd>
        GUI is automatically updated if changes are made to the data.
    </dd>

    <dt>
        Navigation
    </dt>
    <dd>
        Access to a single author and book pages simply by clicking the author or book name.
    </dd>
</dl>

<page-info-files data-files="{{files}}"></page-info-files>
